import { http } from "@/utils/http";

type Result = {
  success: boolean;
  message?: string;
  data?: any;
};

// type ServerInfo = {
//   version: string;
//   bindAddr: string;
//   bindPort: number;
//   enableAuth: boolean;
//   username: string;
//   password: string;
//   logPath: string;
//   startTime: string;
// };

/** 获取当前客户端列表 */
export const getServerInfo = (data?: object) => {
  return http.request<Result>("get", "/api/v1/server/info", { data });
};

/** 获取当前客户端列表 */
export const getClientsState = (data?: object) => {
  return http.request<Result>("get", "/api/v1/clients/stats", { data });
};
